package com.adou.d8.thread;

/**
 *
 */
public class ThreadTest2 {
    public static void main(String[] args) {
        // 3.创建任务对象
        Runnable myRunnable = new MyRunnable();

        // 4.任务对象放入线程对象中
        final Thread thread = new Thread(myRunnable);

        // 5.启动
        thread.start();


        for (int i = 0; i < 5; i++) {
            System.out.println("主线程 Main 线程输出 " + i);

        }
    }
}
